<script lang="ts" setup>
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { useAppStore, useUserStore } from '@/store';

const { safeArea, windowHeight, menuButtonBounding, sysInfo } = storeToRefs(useAppStore())

onLaunch(() => {

  const systemInfo = uni.getSystemInfoSync()
  // console.warn('...launch systemInfo: ', systemInfo)

  sysInfo.value = {
    uniPlatform: systemInfo.uniPlatform.toUpperCase(), // 注意是大写
    deviceId: systemInfo.deviceId,
  }

  const sai = systemInfo!.safeAreaInsets || { top: 0, left: 0, right: 0, bottom: 0 }
  safeArea.value = {
    top: sai.top,
    left: sai.left,
    right: sai.right,
    bottom: sai.bottom
  }

});


</script>

<style lang="scss">
@import "nutui-uniapp/styles/index.scss";
</style>
